home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / ww2-div-pac.g < prev    next >
Text File  |  1995-05-04  |  6KB  |  270 lines

  1. (game-module "ww2-div-pac"
  2.   (title "WWII, Division-level, Pacific")
  3.   (blurb "Definitions for divisional/theater-level WWII in the Pacific")
  4.   )
  5.  
  6. (unit-type a-inf (image-name "inf-div") (possible-sides "allied")
  7.   (help "Allied infantry division"))
  8. (unit-type a-armor (image-name "armor-div") (possible-sides "allied"))
  9.  
  10. (unit-type j-inf (image-name "inf-div") (possible-sides "japanese"))
  11. (unit-type j-armor (image-name "armor-div") (possible-sides "japanese"))
  12.  
  13. (unit-type para (image-name "para-div") (possible-sides "allied"))
  14. (unit-type hq (image-name "flag"))
  15.  
  16. (define ground-types (a-inf a-armor j-inf j-armor para hq))
  17.  
  18. (unit-type aa (image-name "ap"))
  19. (unit-type dd (image-name "dd"))
  20. (unit-type ss (image-name "sub"))
  21. (unit-type cl (image-name "ca"))
  22. (unit-type ca (image-name "ca"))
  23. (unit-type cve (image-name "cv"))
  24. (unit-type cvl (image-name "cv"))
  25. (unit-type cvs (image-name "cv"))
  26. (unit-type cv (image-name "cv"))
  27. (unit-type bc (image-name "bb"))
  28. (unit-type bb (image-name "bb"))
  29.  
  30. (define small-ship-types (aa dd ss))
  31.  
  32. (define large-ship-types (cl ca cve))
  33.  
  34. (define capital-ship-types (cvl cvs cv bc bb))
  35.  
  36. (define carrier-types (cve cvl cvs cv))
  37.  
  38. (define ship-types (append small-ship-types large-ship-types capital-ship-types))
  39.  
  40. (unit-type airfield (image-name "airbase"))
  41. (unit-type airbase)
  42. (unit-type port)
  43. (unit-type town (image-name "town20"))
  44. (unit-type city (image-name "city20"))
  45.  
  46. (define place-types (airfield airbase port town city))
  47.  
  48. (material-type org ; organization
  49.   (help "important to do things, acquired from HQs"))
  50. (material-type air ; aircraft
  51.   (help "attached aircraft used for support"))
  52.  
  53. (terrain-type sea)
  54. (terrain-type atoll)
  55. (terrain-type clear)
  56. (terrain-type jungle (image-name "forest"))
  57. (terrain-type hills)
  58. (terrain-type mountains)
  59. (terrain-type road (subtype connection))
  60. (terrain-type river (subtype border))
  61. (terrain-type reef (subtype border) (color "gray"))
  62.  
  63. (define water (sea atoll))
  64. (define land (clear jungle mountains))
  65.  
  66. (define cell-t* (sea atoll clear jungle hills mountains))
  67.  
  68. ;;; Static relationships.
  69.  
  70. (table vanishes-on
  71.   (ground-types sea true)
  72.   (ship-types land true)
  73.   (place-types sea true)
  74.   ((town city) atoll true)
  75.   )
  76.  
  77. (add sea capacity 100)
  78.  
  79. (add land capacity 4)
  80.  
  81. (add aa capacity 1)
  82.  
  83. (table unit-size-as-occupant
  84.   (u* aa 99)
  85.   (ground-types aa 1)
  86.   )
  87.  
  88. (table unit-storage-x
  89.   (u* org 1)
  90.   ;; Aircraft complements for various types of carriers.
  91.   (carrier-types air (24 36 12 72))
  92.   (place-types air (72 144 0 288 576))
  93.   )
  94.  
  95. ;;; Vision.
  96.  
  97. (set terrain-seen true)
  98.  
  99. (add u* already-seen 20)
  100. (add place-types already-seen 100)
  101.  
  102. ;; Range should depend on availability of scout aircraft...
  103.  
  104. (add carrier-types vision-range 4)
  105.  
  106. (add place-types vision-range 4)
  107.  
  108. ;;; Action parameters.
  109.  
  110. (add ground-types acp-per-turn 1)
  111. (add ship-types acp-per-turn 24)
  112.  
  113. ;;; Movement.
  114.  
  115. (table mp-to-enter-terrain
  116.   (ground-types sea 99)
  117.   (ship-types land 99)
  118.   (ship-types atoll 12)
  119.   )
  120.  
  121. (table mp-to-leave-terrain
  122.   (ship-types atoll 12)
  123.   )
  124.  
  125. ;;; Combat.
  126.  
  127. (add ground-types hp-max    12)
  128. (add ground-types parts-max 12)
  129.  
  130. ;aa dd ss cl ca cve cvl cvs cv bc bb
  131.  
  132. (add ship-types hp-max    (6 6 6 4 6 4 4 4 5 5 6))
  133. (add ship-types parts-max (6 6 6 2 2 2 1 1 1 1 1))
  134.  
  135. (add place-types hp-max (10 20 20 40 80))
  136.  
  137. (table acp-to-attack
  138.   (ship-types u* 6)
  139.   )
  140.  
  141. (table acp-to-defend
  142.   (u* ship-types 6)
  143.   )
  144.  
  145. (add carrier-types acp-to-fire 12)
  146. (add place-types acp-to-fire 12)
  147.  
  148. (table acp-to-be-fired-on
  149.   (carrier-types carrier-types 6)
  150.   )
  151.  
  152. (add carrier-types range 8)
  153. (add place-types range 8)
  154.  
  155. (table hit-chance
  156.   (ship-types ship-types 50)
  157.   )
  158.  
  159. (table damage
  160.   (ship-types ship-types 1)
  161.   )
  162.  
  163. (table consumption-per-attack
  164.   ;; Expect to lose one plane in an attack.
  165.   (carrier-types air 1)
  166.   (place-types air 1)
  167.   )
  168.  
  169. (table hit-by
  170.   ;; Planes can attack just about anything.
  171.   (u* air 1)
  172.   )
  173.  
  174. (table material-to-fight
  175.   (carrier-types air 6)
  176.   )
  177.  
  178. (table capture-chance
  179.   (ground-types airfield 100)
  180.   (ground-types (airbase port) 90)
  181.   (ground-types (town city) 50)
  182.   )
  183.  
  184. ;;; Defaults for testing.
  185.  
  186. ;;; Some defns for the fractal percentile generator.
  187.  
  188. (set alt-blob-density 10000)
  189. (set alt-blob-size 20)
  190. (set alt-smoothing 6)
  191. (set wet-blob-density 2000)
  192. (set wet-blob-size 100)
  193.  
  194. (add cell-t* alt-percentile-min (  0  90  90  90  97  98))
  195. (add cell-t* alt-percentile-max ( 90  91  97  97  98 100))
  196. (add cell-t* wet-percentile-min (  0   0   0  50   0   0))
  197. (add cell-t* wet-percentile-max (100 100  50 100 100 100))
  198.  
  199. ;;; River generation.
  200.  
  201. (add (clear jungle hills mountains) river-chance (5000 10000 10000 10000))
  202.  
  203. (set river-sink-terrain sea)
  204.  
  205. ;(table terrain-interaction (river (sea shallows) non-terrain))
  206.  
  207. (set edge-terrain sea)
  208.  
  209. (add u* start-with 1)  ; one of everything
  210.  
  211. (set country-radius-min 4)
  212. (set country-separation-min 20)
  213. (set country-separation-max 60)
  214.  
  215. (add (sea clear) country-terrain-min (10 5))
  216.  
  217. (table favored-terrain
  218.   (u* t* 0)
  219.   (ground-types land 100)
  220.   (ship-types sea 100)
  221.   (place-types land 100)
  222.   )
  223.  
  224. (table unit-initial-supply
  225.   (u* m* 9999)
  226.   (place-types air 100)
  227.   )
  228.  
  229. (set side-library '(
  230.   ((name "Allies") (adjective "Allied") (emblem-name "flag-usa")
  231.    (class "allied") (names-locked true)
  232.    (unit-namers
  233.     (cl "us-cl-names")
  234.     (ca "us-ca-names")
  235.     (cve "us-cve-names")
  236.     (cv "us-cv-names")
  237.     (bb "us-bb-names"))
  238.    )
  239.   ((name "Japan") (adjective "Japanese") (emblem-name "flag-japan")
  240.    (class "japanese") (names-locked true)
  241.    (unit-namers
  242.     (ca "japanese-ca-names")
  243.     (cve "japanese-cve-names")
  244.     (cv "japanese-cv-names")
  245.     (bb "japanese-bb-names"))
  246.    )
  247.   ;; Russia and China useful as distinct sides?
  248.   ))
  249.  
  250. (include "ng-ships")
  251.  
  252. (set calendar '(usual "day"))
  253.  
  254. (world 800 (year-length 365))
  255.  
  256. (game-module (design-notes (
  257.   "The map-scale is 30 miles/hex, game time is 1 day/turn."
  258.   "One unit of aircraft material is one plane."
  259.   ""
  260.   "To Do:"
  261.   ""
  262.   "Adapt old pacific map."
  263.   ""
  264.   "Could have one port and one airfield share a hex, but no more."
  265.   ""
  266.   "Units with aircraft should have a long vision range."
  267.   ""
  268.   "Add fuel as material, scenarios could predefine certain places to have lots."
  269.   )))
  270.